﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity;
using System.Data;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
    public class T_BUserInfo
    {
        //获取用户信息
        public static List<UserInfo> UserInfomaction(UserInfo us)
        {
            SqlDataReader sdr = T_Userinfo.UserInfomaction(us);
            List<UserInfo> u = new List<UserInfo>();
            while (sdr.Read())
            {
                UserInfo i = new UserInfo();
                i.UserId = (int)sdr["UserId"];
                i.UserName = (string)sdr["UserName"];
                i.UserPwd = (string)sdr["UserPwd"];
                i.UserPower = (int)sdr["UserPower"];
                i.UserState = (int)sdr["UserState"];
                i.InfoName = (string)sdr["InfoName"];
                i.InfoSex = (int)sdr["InfoSex"];
                i.InfoDate = (string)sdr["InfoDate"];
                i.InfoMail = (string)sdr["InfoMail"];
                i.InfoPhone = (string)sdr["InfoPhone"];
                i.InfoAddress = (string)sdr["InfoAddress"];
            }
            sdr.Close();
            return u;
        }

        //写入用户反馈
        public static bool UFk(FeedBack fk)
        {
            return T_Userinfo.UFk(fk);
        }
    }
}
